/**
 * Date：2017.05.13 星期六 下午
 * Function：用户模型 
 * E-mail：woaitianwen@qq.com
 * Author：zhouyulong
 */

"use strict";

// 配置并链接MongoDB
var mongoose = require('mongoose'),
    User = mongoose.model('Users');

//创建用户名model
var UserSchema = new UserSchema({
    username: {
        type: String,
        unique: true
    },
    email: {
        type: String,
        required: true
    },
    password: {
        type: String,
        required: true
    }
});


module.exports = mongoose.model('Users', UserSchema);

